package com.cloudbroker.bcs.platform.dav.configure.define.parser;

import org.dom4j.Element;

import com.cloudbroker.bcs.platform.dav.configure.define.element.Block;
import com.cloudbroker.bcs.platform.dav.configure.define.element.Group;
import com.cloudbroker.bcs.platform.dav.configure.define.element.HTMLFragment;

public class GroupParser extends AbstractHTMLFragmentParser<Group<? extends Group<?, ?>, ? extends Block<?, ?>>> {
    
    public GroupParser(ConfigureParser configureParser) {
        super(configureParser);
    }
    
    @Override
    public String parseFor() {
        return "group";
    }
    
    @SuppressWarnings("rawtypes")
    @Override
    public Group parseHTMLFragment(Element element, HTMLFragment<?, ?> contextFragment) {
        Group group = new Group();
        group = parseForAbstractHTMLFragment(group, element);
        
        configureParser.parseChildElements(group, element);
        
        return group;
    }
    
}
